#pragma once
#include "WizardWnd.h"

#define VOLUMEWND_CLASS_NAME			_T("VolumeWnd")

class CVolumeWnd : public CWizardWnd
{
public:
	CVolumeWnd();
	LPCTSTR GetWindowClassName() const { return VOLUMEWND_CLASS_NAME; };

protected:
	BEGIN_DUINOTIFY_MAPEX(CWizardWnd)
		ON_DUINOTIFY_TYPE("windowinit", OnWindowInit)
		ON_DUINOTIFY_CONTROL("click", "load_height_button", OnLoadHeight)
		ON_DUINOTIFY_CONTROL("click", "load_porosity_button", OnLoadPorosity)
		ON_DUINOTIFY_CONTROL("click", "load_saturation_button", OnLoadSaturation)
	END_DUINOTIFY_MAPEX()

	void OnWindowInit(TNotifyUI& msg);
	void OnLoadHeight(TNotifyUI& msg);
	void OnLoadPorosity(TNotifyUI& msg);
	void OnLoadSaturation(TNotifyUI& msg);
	virtual bool OnGoingToNextPage();

private:
	CEditUI* m_pAreaEdit;
	CEditUI* m_pHeightEdit;
	CEditUI* m_pPorosityEdit;
	CEditUI* m_pSaturationEdit;
	CEditUI* m_pDrainablePorosityEdit;
	CRichEditUI* m_pMsgEdit;
	double GetAverageFromFile(LPCTSTR szFile);
};
